package com.example.Java8InAction.lamdba;

import org.junit.Test;

public class ThreadDemo {

    @Test
    public void demo(){

        Runnable target = () -> System.out.println("ddd");
        new Thread(target).start();

        Runnable target1 = new Runnable() {
            @Override
            public void run() {
                System.out.println("hello");
            }
        };
        new Thread(target1).start();
    }
}
